<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="../../topjui/css/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="../../topjui/themes/default/topjui.red.css" rel="stylesheet" id="dynamicTheme"/>
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="../../static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- layui框架样式 -->
    <link type="text/css" href="../../static/plugins/layui/css/layui.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="../../static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="../../static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="../../topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="../../topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- layui框架js -->
    <script type="text/javascript" src="../../static/plugins/layui/layui.js" charset="utf-8"></script>
</head>

<body>
<table data-toggle="topjui-treegrid"
       data-options="id:'menuTg',
        idField:'id',
        treeField:'text',
        url:remoteHost+'/system/codeItem/getListByCodeSetIdAndLevelId?codeSetId=0&levelId=0',
        expandUrl:remoteHost+'/system/codeItem/getListByPid?pid={id}',
        fitColumns:true,
        contextMenu:{id:'tgcm'}">
    <thead>
    <tr>
        <th data-options="field:'uuid',title:'UUID',checkbox:true"></th>
        <th data-options="field:'text',title:'名称',width:100"></th>
        <th data-options="field:'codeSetId',title:'体系代码',width:100"></th>
        <th data-options="field:'id',title:'编号',width:100"></th>
        <th data-options="field:'pid',title:'父级编号',width:100"></th>
    </tr>
    </thead>
</table>

<!-- 表格工具栏开始 -->
<div id="menuTg-toolbar" class="topjui-toolbar"
     data-options="grid:{
           type:'treegrid',
           id:'menuTg',
           parentIdField:'pid'
       }">
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'openDialog',
       iconCls: 'fa fa-plus',
       dialog:{
           id:'userAddDialog',
           href:_ctx + '/html/complex/dialog_add.html',
           buttonsGroup:[
               {text:'保存',url:_ctx + '/json/response/success.json',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-normal'}
           ]
       }">新增</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event: 'openDialog',
            iconCls: 'fa fa-pencil',
            btnCls: 'topjui-btn',
            dialog: {
                width: 950,
                height: 500,
                href: _ctx + '/html/complex/dialog_edit.html?uuid={uuid}',
                url: _ctx + '/json/product/detail.json?uuid={uuid}',
                buttonsGroup: [
                    {
                        text: '更新',
                        url: _ctx + '/json/response/success.json',
                        iconCls: 'fa fa-save',
                        handler: 'ajaxForm',
                        btnCls: 'topjui-btn'
                    }
                ]
            }">编辑</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'doAjax',btnCls:'topjui-btn-normal',
       iconCls:'fa fa-trash',
       url:_ctx + '/json/response/success.json',
       grid: {uncheckedMsg:'请先勾选要删除的数据',param:'uuid:uuid,codeSetId:codeSetId'}">删除</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'filter',btnCls:'topjui-btn-warm'">过滤</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'search',btnCls:'topjui-btn-danger'">查询</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'export',btnCls:'topjui-btn',
       url:_ctx + '/json/response/export.html'">导出</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'openTab',
       btnCls:'topjui-btn-normal',
       tab:{
           title:'这是新的Tab窗口',
           href:_ctx + '/html/menu/openTab_index.html'
       }">打开Tab窗口</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'openWindow',btnCls:'topjui-btn-warm',
       href:'http://www.topjui.com?uuid={uuid}'">打开新窗口</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="event:'request',
       btnCls:'topjui-btn',
       url:_ctx + '/json/response/success.json'">执行普通请求</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="menu:'#exportSubMenu',
       btnCls:'topjui-btn-danger',
       hasDownArrow:true,
       iconCls:'fa fa-list'">更多</a>
    <div id="exportSubMenu" class="topjui-toolbar" style="width:150px;">
        <div data-toggle="topjui-menubutton"
             data-options="event:'request',
             url:_ctx + '/json/response/success.json?uuid={uuid}',
             grid:{
                 type:'treegrid',
                 id:'menuTg'
             }">导出 PDF 报表
        </div>
        <div data-toggle="topjui-menubutton"
             data-options="event:'export',
             url: _ctx + '/json/response/export.html',
             grid:{
                 type:'treegrid',
                 id:'menuTg'
             }">导出EXCEL列表
        </div>
        <div data-toggle="topjui-menubutton"
             data-options="event:'request',
             url:_ctx + '/json/response/success.json?uuid={uuid}',
             grid:{
                 type:'treegrid',
                 id:'menuTg'
             }">导出EXCEL报表
        </div>
        <div data-toggle="topjui-menubutton"
             data-options="event:'request',
             url:_ctx + '/json/response/success.json?uuid={uuid}',
             grid:{
                 type:'treegrid',
                 id:'menuTg'
             }">导出WORD报表
        </div>
    </div>
</div>
<!-- 表格工具栏结束 -->
</body>
</html>